package com.baosight.risk.webservice.fltd.task;

import com.baosight.risk.common.result.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.ws.rs.core.MediaType;

/**
 * 作者： lishaoqing
 * 时间： 2019年09月20日
 * 描述： FLTDTaskController
 * 版本: v1.0
 */
@Api(value="oa待办",description = "oa待办",produces = MediaType.APPLICATION_JSON)
@Slf4j
@RestController
@RequestMapping("/oa/task")
public class TESTTaskController {

    @Autowired
    private FLTDTaskBiz bizService;

    @ApiOperation("新增一条oa待办")
    @GetMapping("add")
    public AjaxResult selectProcId(String userCode, String msgNo, int num){

//        bizService.insertOA("045644", 3);
//        bizService.closeMessage("045644", 3);

//        bizService.insertOA("178158", 3);

        bizService.insertOA(userCode, msgNo, num);
//        bizService.closeMessage(userCode, num);

        return AjaxResult.success();
    }

    @ApiOperation("关闭一条oa待办")
    @GetMapping("close")
    public AjaxResult close(String userCode ,String msgNo){
        bizService.closeMessage(userCode, msgNo, 0);
        return AjaxResult.success();
    }



}
